export class AjaxResult<T> {
    code: number;
    data: T;
    message: string;

    static success<T>(data?: T) {
        return {
            code: 200,
            data: data,
            message: '请求完成',
        } as AjaxResult<T>
    }

    static error(data: string) {
        return {
            code: 500,
            message: data,
        } as AjaxResult<string>
    }
}